package com.example.property.entity

import com.blankj.utilcode.util.GsonUtils
import com.example.network.BaseResponse
import com.google.gson.JsonArray
import org.json.JSONArray
import java.io.Serializable

data class CarApplyResultEntity(
    val msg: String,
    val statuesCode: String,
    val values: String,
):BaseResponse(){
    fun getValues():List<CarApplyValues>{
        var list = mutableListOf<CarApplyValues>()
        var jsonArray =JSONArray(values)
        for (i in 0  until  jsonArray.length()) {
            list.add(GsonUtils.fromJson(jsonArray[i].toString(), CarApplyValues::class.java))
        }
        return list
    }
}

data class CarApplyValues(
    var parkUser: Int = 0,
    var parkId: Int = 0,
    var parkTime: String = "",
    var parkName: String = "",
    var parkEnd: String = "",
    var parkStart: String = "",
    var leftFlag: Boolean = false
):Serializable
